/*
 * @(#)Command.java	1.0 2010/07/01
 *
 * Copyright 2010 guyven and David Croft. All rights reserved.
 */
package com.iawg.attrition.engine.command;

/**
 * The command class processes an Actor, and Action and a Targetable and
 * creates a message for the engine to render.
 * 
 * @param <U> Actor
 * @param <A> Action
 * @param <T> Target
 * 
 * @author Guyven
 * @author William David Croft Jr.
 * @version 1.0 2010/07/01
 */
public abstract class Command<U,A,T> {
	/** The Actor who will be performing the command. */
	protected U actor;
	/** The action that the Actor is to perform. */
	protected A action;
	/** The target of the Action that is being performed. */
	protected T target;
	
	/** 
	 * Constructs a new command with the given arguments.
	 * 
	 * @param actor The Actor who will be performing the command.
	 * @param action The action that the Actor is to perform.
	 * @param target The target of the Action that is being performed.
	 */
	public Command(U actor, A action, T target){
		this.actor = actor;
		this.action = action;
		this.target = target;
	}
	
	/**
	 * The method will perform this command.
	 * 
	 * @return <strong>true</strong> if the command was performed successfully.
	 */
	public abstract boolean performCommand();
	
//	/** @return The Actor who will be performing the command. */
//	public U getActor(){
//		return actor;
//	}
//	
//	/** @return The action that the Actor is to perform. */
//	public A getAction(){
//		return action;
//	}
//	
//	/** @return The target of the Action that is being performed. */
//	public T getTarget(){
//		return target;
//	}
}